<?php
namespace Tbf\Component\Crypto\Password\Plan;
use Tbf\Component\Crypto\Password\HashInterface;
use Tbf\Component\Crypto\Password\PlanInterface;
use Tbf\Component\Crypto\Password\VerifyInterface;
class BasePlan implements PlanInterface
{
    protected $hash_plan;
    protected $verify_plan;
    public function __construct(HashInterface $hash_plan,VerifyInterface $verify_plan)
    {
        $this->hash_plan = $hash_plan;
        $this->verify_plan = $verify_plan;
    }
    public function hash($plain)
    {
        return $this->hash_plan->hash($plain);
    }
    public function verify($plain,$hashed)
    {
        return $this->verify_plan->verify($plain,$hashed);
    }
    public function support($hashed)
    {
        return $this->verify_plan->support($hashed);
    }
}
